package com.cxl.demo;

import java.io.*;
import java.nio.channels.FileChannel;

public class FileChannelDemo1 {
    public static void main(String[] args) throws Exception {
//        FileInputStream file = new FileInputStream("/Users/chenlei/IdeaProjects/demo/test.txt");
//
//        FileChannel fileChannel = file.getChannel();
//
//            fileChannel.lock(0,Integer.MAX_VALUE,true);
////            Thread.sleep(30*1000);
//            fileChannel.force();
    }
}
